﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp11
{
    class Program
    {
        static void Main(string[] args)
        {
            Superman superman = new Superman("超人");
            //superman.eat();
            //superman.fly();
            superman.hello();
            Fly(superman);
            Eat(superman);
            Console.WriteLine("-----");
            Birds birds = new Birds("小鸟");
            birds.hello();
            Fly(birds);
            Eat(birds);
            //birds.fly();
            //birds.eat();
            Console.WriteLine("-----");
            Aircraft aircraft = new Aircraft("飞机");
            //aircraft.fly();
            aircraft.Hello();
            Fly(aircraft);



        }
        public static void Fly(IFLY fLY) 
        {
            fLY.fly();
        }
        public static void Eat(Ieat ieat)
        {
            ieat.eat();
        }
    }
}
